<template>
  <div class="card" @click="$router.push(toURL)">
    <div class="div_img-star">
      <slot name="img"></slot>
      <div class="slogan-container">
        <p class="p_title"><slot name="title"></slot></p>
        <div class="div_flex-row">
          <p class="p_subtitle"><slot name="subtitle"></slot></p>
          <el-link
            type="primary"
            class="subtitle"
            :underline="false"
            :href="toURL"
            >立即体验<i class="el-icon-right"></i>
          </el-link>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "IntroduceCard",
  props: {
    toURL: String,
  },
};
</script>

<style scoped>
.subtitle {
  font-size: 16px;
}
.card {
  border-radius: 16px;
  width: 32.5vw;
  height: 38vh;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.01);
  background-color: #ffffff;
}
.card:hover {
  background-image: linear-gradient(
    to right,
    rgba(209, 237, 255, 0.8) 0%,
    rgba(255, 255, 255, 0) 80%
  );
}

.div_img-star {
  width: 100%;
  height: 100%;
  background-image: url(../assets/icons/star.png);
  background-size: 8%;
  background-repeat: no-repeat;
  background-position: right 10% top 10%;
  position: relative;
}

.p_title {
  font-family: PingFangSC-Semibold;
  font-size: 28px;
  color: #19242c;
  font-weight: 600;
  margin-bottom: 1.5vh;
}

.p_subtitle {
  font-family: PingFangSC-Regular;
  font-size: 18px;
  color: #19242c;
  line-height: 24px;
  font-weight: 400;
}

.slogan-container {
  width: 80%;
  position: absolute;
  bottom: 11%;
  left: 8%;
}

.div_flex-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
</style>